Introduction: With writing the special code based on Grid Search technique, best method for describing the elements energy spectrum is introduced. This method is suitable for investigation of Atomic, molecular and nuclear Energy spectrum, laser pulses and study of spectrum that obtained by laser interaction with cell and human body.Microraman spectrum of eye lens that fitted by De. Mul and time spectrum of one molecule that excited by 585 nm laser and fitted by Gnu plot software. In a special application, this method is used for 22Na spectrums.Material and Methods: For fitting mathematical function to a set of experimental data, the first step is seeing data plot in every software. Then, an initial mathematical function is guessed and the function parameters change as far as possible for initial fitting. After this step, by using this special code based on Grid Search technique, is the X2 changes between function data and experimental data are compared. If the X2 is high, it will reduce by introducing small change in every parameter of mathematical function. This is done step, by step, so the X2 reaches to the lowest.Results: By this method, we can have the formulation of element energy spectrum. For example, the equation of 22Na energy spectrum’s description with least squares fitted by experiment data is: N=199.0477 +76100EXP (0.00167 (E-508.7539) 2) + 75100EXP (0.00168 (E-509.2428) 2) + 3450.8070 EXP (0.0000831(E-655.356) 2) + 4002.813EXP (0.0001431(E-839.401) 2) + 11000EXP (0.00105 (E-1048.0230) 2) Fitting start with fit parameter X2=1107.6 and finished with X2 =44.16.Conclusion: By using the special code based on Grid Search technique, we try to introduce the best method for describing of the elements energy spectrum.